package com.library.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 借阅记录实体
 */
@Data
@TableName("borrow_record")
public class BorrowRecord {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private Long userId;
    
    private Long bookId;
    
    private LocalDateTime borrowDate;
    
    private LocalDateTime dueDate;
    
    private LocalDateTime returnDate;
    
    private Integer renewCount;
    
    private String status;
    
    private BigDecimal fine;
    
    @TableLogic
    private Integer deleted;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @TableField(exist = false)
    private String username;
    
    @TableField(exist = false)
    private String bookTitle;
    
    @TableField(exist = false)
    private String bookAuthor;
}

